<p class="Paragraph"><help:paragraphinfo state="U" number="6" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">FileNumber:</span> Number of the file that contains the data that you want to read. The file must be opened with the Open statement using the key word INPUT.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">var:</span> A numeric or string variable that you assign the values read from the opened file to.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/>The <span class="T1">Input#</span> statement reads numeric values or strings from an open file and assigns the data to one or more variables. A numeric variable is read up to the first carriage return (Asc=13), line feed (Asc=10), space, or comma. String variables are read to up to the first carriage return (Asc=13), line feed (Asc=10), or comma.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/>Data and data types in the opened file must appear in the same order as the variables that are passed in the "var" parameter. If you assign non-numeric values to a numeric variable, "var" is assigned a value of "0".</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/>Records that are separated by commas, commas cannot be assigned to a string variable. Quotation marks (") in the file are disregarded as well. If you want to read these characters from the file, use the <span class="T1">Line Input#</span> statement to read pure text files (files containing only printable characters) line by line.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="11" xmlns:help="http://openoffice.org/2000/help"/>If the end of the file is reached while reading a data element, an error occurs and the process is aborted.</p>
<p class="PropText"><help:paragraphinfo state="U" number="20" xmlns:help="http://openoffice.org/2000/help"/>Open aFile For Output As #iNumber</p>
<p class="PropText"><help:paragraphinfo state="U" number="21" xmlns:help="http://openoffice.org/2000/help"/>Print #iNumber, "This is a line of text"</p>
<p class="PropText"><help:paragraphinfo state="U" number="22" xmlns:help="http://openoffice.org/2000/help"/>Print #iNumber, "This is another line of text"</p>